home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.003 / stk-3 / stk / 3.1 / demos / Wcheck.stklos < prev    next >
Encoding:
Text File  |  1996-07-29  |  941 b   |  24 lines

  1. ;;;;
  2. ;;;; STk adaptation of the Tk widget demo.
  3. ;;;;
  4. ;;;; This demonstration script creates a toplevel window containing
  5. ;;;; several checkbuttons.
  6. ;;;;
  7. (require "Button")
  8.  
  9. (define (demo-check)
  10.   (let ((w  (make-demo-toplevel "check"
  11.                 "Checkbutton Demonstration"
  12.                 "Three checkbuttons are displayed below.  If you click on a button, it will toggle the button's selection state and set a Tcl variable to a value indicating the state of the checkbutton.  Click the \"See Variables\" button to see the current values of the variables."
  13.                 'wipers 'brakes 'sober)))
  14.     ;; Create checkbuttons
  15.     (pack (make <Check-button> :parent w :text "Wipers OK" 
  16.             :variable 'wipers :relief "flat")
  17.           (make <Check-button> :parent w :text "Brakes OK" 
  18.             :variable 'brakes :relief "flat")
  19.           (make <Check-button> :parent w :text "Driver Sober" 
  20.             :variable 'sober :relief "flat")
  21.           :side "top"
  22.           :pady 2
  23.           :anchor "w")))
  24.